package keeto.com.vn.bms.utils;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class DateTimeSystem {
	private int YEAR;
	private int MONTH;
	private int DATE;
	private int HOUR;
	private int MINUTE;
	private int SECOND;
	private Calendar cal;
	public DateTimeSystem() {
		cal = GregorianCalendar.getInstance();
	}
	public DateTimeSystem(int yEAR, int mONTH, int dATE, int hOUR, int mINUTE, int sECOND) {
		super();
		YEAR = yEAR;
		MONTH = mONTH;
		DATE = dATE;
		HOUR = hOUR;
		MINUTE = mINUTE;
		SECOND = sECOND;		
		cal = GregorianCalendar.getInstance();
	}
	public int getYEAR() {
		return cal.get(Calendar.YEAR);
	}
	public void setYEAR(int yEAR) {
		YEAR = yEAR;
	}
	public int getMONTH() {
		return cal.get(Calendar.MONTH) +1;
	}
	public void setMONTH(int mONTH) {
		MONTH = mONTH;
	}
	public int getDATE() {
		return cal.get(Calendar.DATE);
	}
	public void setDATE(int dATE) {
		DATE = dATE;
	}
	public int getHOUR() {
		return cal.get(Calendar.HOUR);
	}
	public void setHOUR(int hOUR) {
		HOUR = hOUR;
	}
	public int getMINUTE() {
		return cal.get(Calendar.MINUTE);
	}
	public void setMINUTE(int mINUTE) {
		MINUTE = mINUTE;
	}
	public int getSECOND() {
		return cal.get(Calendar.SECOND);
	}
	public void setSECOND(int sECOND) {
		SECOND = sECOND;
	}
	
	public String getDateMonthYear() {
		DateTimeSystem dateTimeSystem = new DateTimeSystem();
		String DateMonthYear = dateTimeSystem.getYEAR() + "/"
				+ dateTimeSystem.getMONTH() + "/" + dateTimeSystem.getDATE()
				+ " " + dateTimeSystem.getHOUR() + ":"
				+ dateTimeSystem.getMINUTE() + ":" + dateTimeSystem.getSECOND();
		return DateMonthYear;
	}
	public static String getDateMonthYear1() {
		DateTimeSystem dateTimeSystem = new DateTimeSystem();
		String DateMonthYear = dateTimeSystem.getDATE() + "-"
				+ dateTimeSystem.getMONTH() + "-" + dateTimeSystem.getYEAR()
				+ " " + dateTimeSystem.getHOUR() + ":"
				+ dateTimeSystem.getMINUTE() + ":" + dateTimeSystem.getSECOND();
		return DateMonthYear;
	}
	public static String getDateMonthYearToServer() {
		DateTimeSystem dateTimeSystem = new DateTimeSystem();
		String DateMonthYear = dateTimeSystem.getYEAR() + "-"
				+ dateTimeSystem.getMONTH() + "-" + dateTimeSystem.getDATE();
		return DateMonthYear;
	}
	
	
	
}
